<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 字符串和字符型对象
    var str1 = "hello world";
    var str2 = new String("hello world");
    // console.log(str1 === str2);
    str1.name = "hahaha";
    str2.name = "hahaha"
    // console.log(typeof(str1))
    // console.log(typeof(str2))
    console.log(str1.name)
    console.log(str2.name)


    // var obj = new Array();
    // var obj = new Object();
    // var obj = new String();
    // var obj = new Boolean();
    // var obj = new Number();
    // var obj = new Date();
    // console.log(typeof(obj));
    // console.log(obj.constructor == Date)
  </script>
</body>
</html>